{extend name="Administrator/nav"} 
{block name="title"}管理员课表首页{/block} 
{block name="content"}
<div class="container">
    <div class="row todayTime">
        <div class="col-md-12"><h2>现在时间:{$todayWeek->name}第{$todayWeek->getWeekorder()}周</h2></div>
    </div>
    <!-- 搜索功能-->
    <div class="row">
        <div class="col-md-12">
            <div class="currentTime">当前位置:{$currentSemester->name}->第{$currentWeekorder}周->{$currentClassroom->name}</div>
        </div>
    </div>
    <div class="row ">
        <div class="col-md-12">
            <form action="{:url('index')}" method="get">
                <div class="row">
                    <div class="col-md-4">
                        <label>学期:</label>
                        <select class="btn btn-default dropdown-toggle" name="semester_id">
                            {volist name="allSemester" id="semester"}
                                <option value="{$semester->id}" {eq name="$semester->id" value="$currentSemester->id"} selected="selected"{/eq}>{$semester->name}</option>
                            {/volist}
                        </select>
                    </div>
                    <div class="col-md-3">
                        <label>周次：</label>
                        <select class="btn btn-default dropdown-toggle" name="weekorder">
                            {for start="1" end="$currentSemester->totalweek+1" }
                                <option value="{$i}" {eq name="$i" value="$currentWeekorder"} selected="selected" {/eq}>第{$i}周</option>
                            {/for}
                        </select>
                    </div>
                    <div class="col-md-3">
                        <label>选择教室：</label>
                        <select class="btn btn-default dropdown-toggle" name="classroom_id">
                            {volist name="allClassroom" id="classroom"}
                            <option value="{$classroom->id}" {eq name="$currentClassroom->id" value="$classroom->id" } selected="selected" {/eq}>{$classroom->name}</option>
                            {/volist}
                        </select>
                    </div>
                    <div class="col-md-2">
                        <button type="submit" class="btn btn-default">搜索</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="row">
        <!-- 表格 -->
        <div class="col-md-12">
            <!-- 显示信息表格 -->
            <!-- 表格 -->
            <table class="table table-hover table-bordered" >
                <tr class="info">
                    <th class="textCenter">节次/星期</th>
                    <th class="firstTd">星期一</th>
                    <th class="firstTd">星期二</th>
                    <th class="firstTd">星期三</th>
                    <th class="firstTd">星期四</th>
                    <th class="firstTd">星期五</th>
                    <th class="firstTd">星期六</th>
                    <th class="firstTd">星期日</th>
                </tr>
                {volist name="secheduleList" id="sechedules" key="key"}
                <tr>
                    <td class="tableTd">第{$key}节</td>
                    {volist name="sechedules" id="sechedule"}
                        <td class="tableTd">
                            {eq name="sechedule->teacher_id" value="$null"}
                            <span>
                                无课
                            </span>
                            {else/}
                            <span>{$sechedule->teacher->name}</span>
                            <br>
                            <span>{$sechedule->course->name}</span>
                            <br>
                            {volist name="Klasses" id="Klass"}
                              {eq name="$sechedule->getKlassesIsChecked($Klass)" value="true"}<span>{$Klass->name}&nbsp&nbsp</span>{else/}{/eq}
                            {/volist}
                            {/eq}
                        </td>
                    {/volist}
                </tr>
                {/volist}
            </table>
        </div>
    </div>
</div>
{/block}